<template>
	<view class="wrapper bg">
		<view class="avatar">
			<image src="../../static/xxmLogo.png"></image>
			<text>ip</text>
			<text>city</text>
		</view>
		<view class="center">
			<view class="down">
				<view class="left">
					<u-icon name="hourglass-half-fill" size="20"></u-icon>
					<text>我的下载</text>
				</view>
				<view class="right">
					<text>0</text>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
			<view class="score">
				<view class="left">
					<u-icon name="star" size="20"></u-icon>
					<text>我的评分</text>
				</view>
				<view class="right">
					<text>0</text>
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
			<view class="chat">

				<view class="left">
					<u-icon name="chat" size="20"></u-icon>
					<text>联系客服</text>
				</view>
				<view class="right">
					<u-icon name="arrow-right"></u-icon>
				</view>
				<!-- #ifndef MP-WEIXIN -->
				<u-button class="btn" type="primary" @click="callPhone">拨打电话</u-button>
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
				<u-button class="btn" open-type="contact" type="primary">联系客服</u-button>
				<!-- #endif -->
			</view>
		</view>
		<view class="footer">
			<view class="update">
				<view class="left">
					<u-icon name="plus" size="20"></u-icon>
					<text>订阅更新</text>
				</view>
				<view class="right">
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
			<view class="about">
				<view class="left">
					<u-icon name="tags" size="20"></u-icon>
					<text>常见问题</text>
				</view>
				<view class="right">
					<u-icon name="arrow-right"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const callPhone = () => {
		uni.makePhoneCall({
			phoneNumber: '114'
		})
	}
</script>

<style lang="scss" scoped>
	.wrapper {
		height: 100vh;
		padding: 15rpx;

		:deep(.u-icon__icon) {
			color: $uni-color-primary !important;
			margin-right: 10rpx;
		}

		.avatar {
			width: 100%;
			height: 400rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			image {
				width: 100rpx;
				height: 100rpx;
				border-radius: 50%;
			}
		}

		.center {
			width: 100%;
			height: 375rpx;
			border: 1px solid #ccc;
			margin-top: 10px;
			display: flex;
			flex-direction: column;


			.down,
			.score,
			.chat {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 125rpx;
				border-bottom: 1px solid #ccc;


				.left,
				.right {
					display: flex;
					align-items: center;
					justify-content: center;
					padding: 0 10px;
				}
			}

			.chat {
				border-bottom: none;
				position: relative;

				:deep(.u-button) {
					position: absolute;
					width: 100rpx;
					height: 125rpx;
					top: 0;
					left: 0;
					opacity: 0;
					width: 100%;
					height: 100%;

				}
			}


		}

		.footer {
			width: 100%;
			height: 250rpx;
			border: 1px solid #ccc;
			margin-top: 10px;
			display: flex;
			flex-direction: column;

			.update,
			.about {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 125rpx;
				border-bottom: 1px solid #ccc;

				.left,
				.right {
					display: flex;
					align-items: center;
					justify-content: center;
					padding: 0 10px;
				}
			}

			.about {
				border-bottom: none;
			}
		}
	}
</style>